#ifndef HOMEWIDGET_H
#define HOMEWIDGET_H

#include <QWidget>
#include <QSqlQuery>

#include "teachersql.h"
#include "Teacher/TeacherMyStudentInfo.h"
#include "Teacher/Attendance.h"

namespace Ui {
class TeacherHome;
}

class TeacherHome : public QWidget
{
    Q_OBJECT

public:
    explicit TeacherHome(const QString &TeaID,QWidget *parent = nullptr);
    void SetTeacher(const QString&TeaID);
    void initClassTable();



    ~TeacherHome()override;
public slots:
    void paintEvent(QPaintEvent* e)override;
    void mouseMoveEvent(QMouseEvent *e)override;

    // 用于向tableWidget_2插入数据
     void insertAttendanceData(const QStringList &data);


     void openAttebdanceWindow();
private slots:
//void on_pushButton_clicked();


    void on_tableWidget_2_cellActivated(int row, int column);

private:
    Ui::TeacherHome *ui;
    QPixmap photo;
    //QSqlDatabase db;
    int pushFlag;
    QString TeaID;
    //TeacherSql sql;
    TeacherMyStudentInfo* TeaInfo=nullptr;
    //Attendance *attendance;

};

#endif // HOMEWIDGET_H
